      <?php
        include("seguridad.php");
        include("top.php");
	include("left.php"); ?>


	<div id="contentC">
	  <div class="center">
	    <h1>Aqui va el contenido</h1><br />

	  </div>



    <?php
        include_once("fachadaBD.php");
        $modelo = $_GET["modelo"];
        $f = new fachadaBD();
        $laptop = $f->obtenerProducto($modelo);
        $row=mysql_fetch_array($laptop);
        $marcas = $f->obtenerMarcas2($row["MARCA"]);
        $options = $f->obtenerProcesadores2($row["PROCESADOR"]);
        
        
    ?>




            <form name = "edicion" action=<? echo "editProducto.php?modelo=".urlencode($row["MODELO"]);?> method="POST" enctype="multipart/form-data">

	<center><table border=0>
        <tr><td>Tipo de Laptop</td><td><select size="1" name="tipo">
				<option <?if($row["TIPO"]==0) echo "selected";?> value="0"
                                     </option>
				<option <?if($row["TIPO"]==1) echo "selected";?> value="1">Laptop</option>
				<option  <?if($row["TIPO"]==2) echo "selected";?> value="2">Minilaptop</option>
				</select></td></tr>
        <tr><td>Modelo</td><td><input type="text" name="modelo" size="20" value=<?echo "\"".$row["MODELO"]."\"";?>></td></tr>
        <tr><td>Marca</td><td><SELECT name="marca" >
                                    <OPTION VALUE=0>
                                    <?=$marcas?></OPTION>
                                    </SELECT> </td></tr>
        <tr><td>C&oacute;digo</td><td><input type="text" name="codigo" size="20" value="<?echo $row["CODIGO"];?>"></td></tr>
        <tr><td>Precio</td><td><input type="text" name="precio" size="20" value=<?echo $row["PRECIO"];?>></td></tr>
        <tr><td>Imagen Principal</td><td><input  type="file" name="imagenp"  value=""></td><td>actual <img src=<?echo $row["IMAGENGRANDE"];?>> </td></tr>

	<tr><td>Imagen Peque</td><td><input type="file" name="imagenpeq" size="20" value=""></td><td>actual <img src=<?echo $row["IMAGENPEQUENA"];?>> </td></tr>
	<tr><td>Imagen Flash</td><td><input  type="file" name="flash" size="20" value=""></td><td>

            <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
                            WIDTH="360" HEIGHT="346" id="compaq">
                            <PARAM NAME=movie VALUE= <? echo $row["IMAGENFLASH"] ;?>>
                            <PARAM NAME=quality VALUE=high>
                            <EMBED src= <? echo $row["IMAGENFLASH"] ;?> quality=high WIDTH="360" HEIGHT="363"
                            NAME="compaq" ALIGN="" TYPE="application/x-shockwave-flash"
                            PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
                            </EMBED>
            </OBJECT>

            </td></tr>
	<tr><td>Procesador</td><td><SELECT name="procesador">
                                    <OPTION VALUE=0>
                                    <?=$options?>
                                    </SELECT> </td></tr>
        <tr><td>Velocidad procesador</td><td><input type="text" name="velproc" size="20" value=<?echo $row["VELOZPROC"];?>> GHZ</td></tr>
        <tr><td>Tipo de Memoria</td><td><select size="1" name="tipomem">
				<option  <?if($row["TIPOMEMORIA"]=="") echo "selected";?> value=""> </option>
				<option  <?if($row["TIPOMEMORIA"]=="DDR") echo "selected";?> value="DDR">DDR</option>
				<option  <?if($row["TIPOMEMORIA"]=="DDR2") echo "selected";?> value="DDR2">DDR2</option>
				<option  <?if($row["TIPOMEMORIA"]=="DDR3") echo "selected";?> value="DDR3">DDR3</option>
				</select></td></tr>
	<tr><td>Memoria</td><td><select size="1" name="memoria">
				<option <?if($row["MEMORIA"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["MEMORIA"]=="1") echo "selected";?> value=1>1</option>
				<option  <?if($row["MEMORIA"]=="2") echo "selected";?> value=2>2</option>
				<option <?if($row["MEMORIA"]=="3") echo "selected";?> value=3>3</option>
     				<option <?if($row["MEMORIA"]=="4") echo "selected";?> value=4>4</option>
				<option <?if($row["MEMORIA"]=="5") echo "selected";?> value=5>5</option>
                		<option <?if($row["MEMORIA"]=="6") echo "selected";?> value=6>6</option>
				<option <?if($row["MEMORIA"]=="7") echo "selected";?> value=7>7</option>
				<option <?if($row["MEMORIA"]=="8") echo "selected";?> value=8>8</option>
				</select> GB</td></tr>
	<tr><td>Disco</td><td><select size="1" name="disco">
				<option <?if($row["DISCO"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["DISCO"]=="40") echo "selected";?> value=40>40</option>
				<option <?if($row["DISCO"]=="80") echo "selected";?> value=80>80</option>
				<option <?if($row["DISCO"]=="100") echo "selected";?> value=100>100</option>
     				<option <?if($row["DISCO"]=="120") echo "selected";?> value=120>120</option>
				<option <?if($row["DISCO"]=="160") echo "selected";?> value=160>160</option>
                		<option <?if($row["DISCO"]=="200") echo "selected";?> value=200>200</option>
				<option <?if($row["DISCO"]=="250") echo "selected";?> value=250>250</option>
				<option <?if($row["DISCO"]=="320") echo "selected";?> value=320>320</option>
                                <option <?if($row["DISCO"]=="500") echo "selected";?> value=500>500</option>
                                <option <?if($row["DISCO"]=="640") echo "selected";?> value=640>640</option>
				</select> GB</td></tr>
	<tr><td>Velocidad de Disco</td><td><select size="1" name="velodisc">
				<option <?if($row["VELOCIDADDISCO"]==0) echo "selected";?> value=""> </option>
				<option <?if($row["VELOCIDADDISCO"]==5400) echo "selected";?> value=5400>5400</option>
				<option <?if($row["VELOCIDADDISCO"]==7200) echo "selected";?> value=7200>7200</option>
				</select> RPM</td></tr>
        <tr><td>Idioma de Teclado</td><td><input type="radio" name="teclado" value="Ingles" <?if($row["TECLADO"]=="Ingles") echo "checked";?>> Ingl&eacute;s
                <input type="radio" name="teclado" value="Espanol" <?if($row["TECLADO"]=="Espanol") echo "checked";?>> Espa&ntilde;ol</td></tr>
        	<tr><td>Pantalla </td><td><select size="1" name="pantalla">
				<option <?if($row["PANTALLA"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["PANTALLA"]=="8.9") echo "selected";?> value=8.9>8.9</option>
				<option <?if($row["PANTALLA"]=="10.1") echo "selected";?> value=10.1>10.1</option>
     				<option <?if($row["PANTALLA"]=="12") echo "selected";?> value=12>12</option>
     				<option <?if($row["PANTALLA"]=="12.1") echo "selected";?> value=12.1>12.1</option>
				<option <?if($row["PANTALLA"]=="13.3") echo "selected";?> value=13.3>13.3</option>
     				<option <?if($row["PANTALLA"]=="14") echo "selected";?> value=14>14</option>
                                <option <?if($row["PANTALLA"]=="14.1") echo "selected";?> value=14.1>14.1</option>
				<option <?if($row["PANTALLA"]=="15.4") echo "selected";?> value=15.4>15.4</option>
                		<option <?if($row["PANTALLA"]=="15.6") echo "selected";?> value=15.6>15.6</option>
				<option <?if($row["PANTALLA"]=="17") echo "selected";?> value=17>17</option>
                                </select> pulgadas</td></tr>
                <tr><td>Descripci&oacute;n pantalla</td><td><input type="text" name="pcoment" size="20" value="<?echo $row["COMMENTPANTALLA"];?>"></td></tr>
                <tr><td>Sistema Operativo</td><td><select size="1" name="sistema">
				<option <?if($row["SISTEMA"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["SISTEMA"]=="Windows XP") echo "selected";?> value="">Windows XP</option>
				<option <?if($row["SISTEMA"]=="Windows Vista") echo "selected";?> value="Windows Vista">Windows Vista</option>
				<option <?if($row["SISTEMA"]=="Windows 7 Starter") echo "selected";?>  value="Windows 7 Starter">Windows 7 Starter</option>
				<option <?if($row["SISTEMA"]=="Windows 7 Home Premium") echo "selected";?> value="Windows 7 Home Premium">Windows 7 Home Premium</option>
     				<option <?if($row["SISTEMA"]=="Windows 7 Profesional") echo "selected";?> value="Windows 7 Profesional">Windows 7 Profesional</option>
				<option <?if($row["SISTEMA"]=="Windows 7 Ultimate") echo "selected";?> value="Windows 7 Ultimate">Windows 7 Ultimate</option>
				<option <?if($row["SISTEMA"]=="Windows 7 Home Basic") echo "selected";?> value="Windows 7 Home Basic">Windows 7 Home Basic</option>
                                <option <?if($row["SISTEMA"]=="Linux") echo "selected";?> value="">Linux</option>
				</select></td></tr>
               <tr><td>Tarjeta de Video</td><td><input type="radio" name="tarjeta" value="dedicado" <?if($row["TARJETA"]=="dedicado") echo "checked";?>> Dedicado
                <input type="radio" name="tarjeta" value="compartido" <?if($row["TARJETA"]=="compartido") echo "checked";?>> Compartido</td></tr>
               	<tr><td>Memoria de Video</td><td><input type="text" name="memvideo" size="20" value="<? echo $row["MEMVIDEO"] ;?>"></td></tr>
        <tr><td>Puertos USB</td><td><input type="text" name="puertos" size="20" value=<? echo $row["PUERTOUSB"] ;?>></td></tr>
        <tr><td>Webcam</td><td><input type="checkbox" name="webcam" value="1" <? if($row["WEBCAM"]) echo "checked"; ?>></td></tr>
        <tr><td>Resoluci&oacute;n de la Webcam</td><td><input type="text" name="camres" size="20" value=<?echo $row["RESOLUCIONCAM"];?> ></td></tr>
        <tr><td>Unidad de lectura</td><td><select size="1" name="unidad">
				<option <?if($row["UNIDADLECTURA"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["UNIDADLECTURA"]=="CD/DVD-RW") echo "selected";?> value="CD/DVD-RW">CD/DVD-RW</option>
				<option <?if($row["UNIDADLECTURA"]=="CD/DVD-RW CON LIGHTSCRIBE") echo "selected";?> value="CD/DVD-RW CON LIGHTSCRIBE">CD/DVD-RW con lightscribe</option>
				</select></td></tr>
	<tr><td>Tipo de garantia</td><td><select size="1" name="garantia">
				<option <?if($row["GARANTIA"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["GARANTIA"]=="1 ano de garantia") echo "selected";?> value="1 ano de garantia">1 a&ntilde;o de garant&iacute;a</option>
				</select></td></tr>
      	<tr><td>Tipo de entrega</td><td><select size="1" name="entrega">
				<option <?if($row["ENVIO"]=="") echo "selected";?> value=""> </option>
				<option <?if($row["ENVIO"]=="inmediato") echo "selected";?> value="inmediato">Retiro personal Env&iacute;o inmediata</option>
      				<option <?if($row["ENVIO"]=="diasiguiente") echo "selected";?> value="diasiguiente">Retiro personal o Env&iacute;o d&iacute;a siguiente</option>
				</select></td></tr>
<!--       	<tr><td>Formas de pago</td><td><select size="1" name="pago">
				<option selected value=""> </option>
				<option  value="deposito">Deposito Bancario</option>
      				<option  value="transferencia">Transferencia</option>
				<option  value="tarjeta">Tarjeta de Cr&eacute;dito</option>
                                </select></td></tr>-->
        <tr><td>Wifi</td><td><input type="checkbox" name="wifi" value="1" <? if($row["WIFI"]) echo "checked"; ?>></td></tr>
        <tr><td>Bluetooth</td><td><input type="checkbox" name="bluetooth" value="1"<? if($row["BLUETOOTH"]) echo "checked"; ?>></td></tr>
        <tr><td>Bateria</td><td><select size="1" name="bateria">
				<option <?if($row["BATERIA"]=="") echo "selected";?>  value=""> </option>
				<option <?if($row["BATERIA"]=="3") echo "selected";?> value=3>3 celdas</option>
				<option <?if($row["BATERIA"]=="4") echo "selected";?> value=4>4 celdas</option>
                                <option <?if($row["BATERIA"]=="6") echo "selected";?> value=6>6 celdas</option>
				<option <?if($row["BATERIA"]=="8") echo "selected";?> value=8>8 celdas</option>
				<option <?if($row["BATERIA"]=="9") echo "selected";?> value=9>9 celdas</option>
     				</select> </td></tr>
        <tr><td>Puertos</td><td><table><tr><td>VGA <input type="checkbox" name="vga" value="1" <? if($row["VGA"]) echo "checked"; ?>></td>
                                        <td>NTSC/PAL <input type="checkbox" name="tv" value="1" <? if($row["TV"]) echo "checked"; ?>></td>
                                        <td>Microfono <input type="checkbox" name="microfono" value="1" <? if($row["MIC"]) echo "checked"; ?>></td></tr>
                                        <tr>
                                        <td>Ethernet <input type="checkbox" name="rj45" value="1" <? if($row["RJ_45"]) echo "checked"; ?>></td>
                                        <td>Modem <input type="checkbox" name="rj11" value="1" <? if($row["RJ_11"]) echo "checked"; ?>></td>
                                        <td>HDMI <input type="checkbox" name="hdmi" value="1" <? if($row["HD_MI"]) echo "checked"; ?>></td></tr>

                                        </tr>
                                </table>
            </td></tr>
       	<tr><td>Otros</td><td><input type="text" name="otros" size="20" value="<?echo $row["OTROS"];?>"></td></tr>
        <tr><td>Disponibildad</td><td><input type="checkbox" name="disp" value="1" <? if($row["DISPONIBLE"]) echo "checked"; ?>></td></tr>
        <tr class=b><td width=90>Descripcion</td> <td><textarea name="descripcion" cols='20' rows='5' onKeyUp="return maximaLongitud(this,249)"><?echo $row["DESCRIPCION"];?></textarea></td></tr>

        </table></center>	<center><input type="button" value="enviar" name="enviar" onClick="javascript:comprueba();"></center>
</form>

<script language="JavaScript" type="text/javascript">

function comprueba(){

	if (document.forms.edicion.modelo.value==""){
		alert("Debe indicar el nombre de modelo");
	}else{
            if (document.forms.edicion.marca.value==""){
		alert("Debe indicar el nombre de la marca");
            }else{
                if (document.forms.edicion.codigo.value==""){
                    alert("Debe indicar el c&oacute;digo de producto");
                }else{
                    document.edicion.submit();
                }
            }
	}
}


</script>
</div>
        <!-- comienzo del footer -->
          <div id="footer">
	<hr>
	<p> Pie de pagina! <br>
	Administrador: <span style=" font-weight: bold;
	text-transform: uppercase;">Pli Negocios </span>.</p>
      </div>
	<div id ="pie">
	<br>
	<h5>PowerLaptops es una marca registrada.
	Todos los derechos reservados, 2010
	info@powerlaptops.com.ve
	<br>Cantv (0212)741-0246
	<br>Digitel +58 0412 7109486</h5>
	</div>

    </body>
</html>
